/**
 * Project Reactor
 */


#ifndef _ACCEPTOR_H
#define _ACCEPTOR_H

#include "Socket.h"
#include "InetAddress.h"

class Acceptor {
private:
    Socket m_sock;
    InetAddress m_addr;
public:     
/**
 * @param ip
 * @param port
 */
Acceptor(const string & ip, unsigned short port);
    
~Acceptor();
    
void ready();
    
void setReuseAddr();
    
void setReusePort();
    
void m_bind();
    
void m_listen();
    
int m_accept();

Socket & getSock();
};

#endif //_ACCEPTOR_H